package com.lcq.study.jvm.leijiazai;

/**
 * @ClassName Test1
 * @Description
 * @Author lichuanqi
 * @Date 2022/1/28 16:08
 * @Version 1.0
 **/
public class Test1 {
    public static void main(String[] args) {
        System.out.println(B.str);
    }
}

class A{
    public static String str = "A str";
    static {
        System.out.println("A static code");
    }
}

class B extends A{
    static {
        str = "B str";
        System.out.println("B static code");
    }
}